package org.e_gold.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "settled_contract")
public class SettledContract extends ValueObject implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String RUNNING = "running";

    @Id
    @GeneratedValue
    private Long id;

    @OneToOne
    @JoinColumn(name = "contract_id")
    private Contract contract;

    @Column(name = "bet_amount")
    private Float betAmount;

    @Column(name = "won_amount")
    private Float wonAmount;

    @Column(name = "result_amount")
    private Float resultAmount;

    private Boolean running;

    @Column(name = "current_goal")
    private Integer currentGoal;

    @Column(name = "under_goal")
    private Integer underGoal;

    private Boolean won;

    public Boolean getWon() {

        return won;
    }

    public void setWon(Boolean won) {

        this.won = won;
    }

    public Integer getUnderGoal() {

        return underGoal;
    }

    public void setUnderGoal(Integer underGoal) {

        this.underGoal = underGoal;
    }

    public Integer getCurrentGoal() {

        return currentGoal;
    }

    public void setCurrentGoal(Integer currentGoal) {

        this.currentGoal = currentGoal;
    }

    public Long getId() {

        return id;
    }

    public void setId(Long id) {

        this.id = id;
    }

    public Contract getContract() {

        return contract;
    }

    public void setContract(Contract contract) {

        this.contract = contract;
    }

    public Float getBetAmount() {

        return betAmount;
    }

    public void setBetAmount(Float betAmount) {

        this.betAmount = betAmount;
    }

    public Float getWonAmount() {

        return wonAmount;
    }

    public void setWonAmount(Float wonAmount) {

        this.wonAmount = wonAmount;
    }

    public Float getResultAmount() {

        return resultAmount;
    }

    public void setResultAmount(Float resultAmount) {

        this.resultAmount = resultAmount;
    }

    public Boolean getRunning() {

        return running;
    }

    public void setRunning(Boolean running) {

        this.running = running;
    }

}
